#ifndef DEVICEGROUP_H
#define DEVICEGROUP_H

#include <QWidget>
#include "deviceModel.h"
#include "DeviceGroupTableModel.h"
#include <QList>
#include <QJsonArray>
#include "SnaillTcpClient.h"
#include <QJsonObject>
namespace Ui {
class DeviceGroup;
}

class DeviceGroup : public QWidget
{
    Q_OBJECT

public:
    explicit DeviceGroup(QWidget *parent = nullptr);
    ~DeviceGroup();
    QList<deviceModel> getDeviceList(const QString &jsonString);
public slots:
    void handleDataReceived(const QByteArray &);
    void boxSelect(int index);
protected:
    void showEvent(QShowEvent *event) override;
private:
    Ui::DeviceGroup *ui;
    DeviceGroupTableModel devmodel;
    QList<deviceModel> deviceList;
};

#endif // DEVICEGROUP_H
